
let state = {
    count: 0,
     dishesKuId:"",
    users:[{id:1,gender:false},
        {id:2,gender:true},
        {id:3,gender:false},
        {id:4,gender:true}]
}
// getters
let getters = {
    boies: state => state.users.filter(item => item.gender), //箭头函数不写大括号不需要写return
    girls: state =>{//箭头函数写大括号必须要用return
        let result=state.users.filter(item => !item.gender)
        console.log(result)
        return result
    }
}
// actions
let actions = {}

// mutations
const mutations = {
    increment (state,n) {
        state.dishesKuId=n.dishesKuId
    }
}
export default {
    namespaced: true,
    state,
    getters,
    actions,
  mutations

  }
